package com.zhyl.springdemo;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.FileSystemResource;
import org.springframework.core.io.Resource;

public class SpringDemo {

	public static void main(String[] args){
		
		Resource rs =new FileSystemResource("E:/eclipse workspace/J2EE/ShopOnLine/src/beans-config.xml");
		BeanFactory factory = new XmlBeanFactory(rs);
		HelloWorld hello = (HelloWorld) factory.getBean("helloBean");
		System.out.println(hello.getHelloWorld());
	}
	
}
